package com.woniu.service.imple;

import com.woniu.adapter.CompanyTaskAdapter;
import com.woniu.outlet.po.CompanyTask;
import com.woniu.service.ICompanyTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CompanyTaskService implements ICompanyTaskService {

    @Autowired
    private CompanyTaskAdapter companyTaskAdapter;

    //这个是客户申请办理业务的
    @Override
    public int addtask(CompanyTask companyTask) {
        int addtask = companyTaskAdapter.addtask(companyTask);
        return addtask;
    }

    //客户经理查看自己任务信息
    @Override
    public List<CompanyTask> findmytask(Integer workerid) {
        List<CompanyTask> findmytask = companyTaskAdapter.findmytask(workerid);
        return findmytask;
    }

    //客户经理来处理客户的业务信息，处理完成之后，还要添加业务表的一条信息
    @Override
    public int handletask(Integer companytaskId, Integer workerid, Integer companyid, Integer companytaskType) {
        int handletask = companyTaskAdapter.handletask(companytaskId, workerid, companyid, companytaskType);
        return handletask;
    }
}
